
#动态库
libmy_comp.so:comp.o code.o
	gcc -o $@ $^ -shared
%.o:%.c
	gcc -fPIC -c $<

.PHONY:clean
clean:
	@rm -rf *.so *.o mycomp*
	@echo "clean ... done"

.PHONY:output
output:
	@mkdir -p mycomp/include
	@mkdir -p mycomp/lib
	@cp -f *.h mycomp/include
	@cp -f *.so mycomp/lib
	@tar -cvf ./mycomp.tgz ./mycomp
	@echo "output comp ... done"


